﻿using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Shapes;
using HalconDisplayControl.Attributes;
using HalconDotNet;

namespace HalconDisplayControl.Shape
{
    public class CircleSectorShape : IShape
    {
        [ParamName("row")]
        public double Row { get; set; } = 200;

        [ParamName("column")]
        public double Column { get; set; } = 200;

        [ParamName("radius")]
        public double Radius { get; set; } = 100.5;

        [ParamName("start_angle")]
        public double StartAngle { get; set; } = 0;

        [ParamName("end_angle")]
        public double EndAngle { get; set; } = 3.14159;

        public void CreateDrawingObj(out HTuple drawId)
        {
            HOperatorSet.CreateDrawingObjectCircleSector(Row, Column, Radius, StartAngle, EndAngle, out drawId);
        }

        public void CreateShapeObj(out HObject shapeObj)
        {
            HOperatorSet.GenCircleSector(
                   out shapeObj,
                   Row,
                   Column,
                   Radius,
                   StartAngle,
                   EndAngle
               );
        }
    }
}
